//
//  UIAlertController+ScreenRotate.m
//  IHome
//
//   Created by zhujizheng on 2020/2/18.
//  Copyright © 2019年 com.zhujizheng. All rights reserved.
//

#import "UIAlertController+ScreenRotate.h"

@implementation UIAlertController (ScreenRotate)

#pragma mark - 屏幕旋转
- (BOOL)shouldAutorotate
{
    return [PYScreenRotateManager shouldAutorotate];
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
    // 这里如果不做这个判断在允许横屏的界面弹出提醒时会死循环
//    if ([PYScreenRotateManager supportedInterfaceOrientations] == UIInterfaceOrientationMaskPortrait) {
//        [UIApplication sharedApplication].statusBarOrientation = [PYScreenRotateManager statusBarOrientation];
//    }
    return [PYScreenRotateManager supportedInterfaceOrientations];
}
/// 实现这个方法，解决导航栏问题,present 
//- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
//{
//    return [PYScreenRotateManager statusBarOrientation];
//}

@end
